import { TokenKey } from '@/config'

const isLogin = () => !!localStorage.getItem(TokenKey)

const getToken = () => {
  return localStorage.getItem(TokenKey)
}

const setToken = (token: string) => {
  localStorage.setItem(TokenKey, token)
}

const removeToken = () => {
  localStorage.removeItem(TokenKey)
}

export { isLogin, getToken, setToken, removeToken }
